Skip to content

Feature/libp2p integration#183

Merged
ericsson49 merged 9 commits intointeropfrom
feature/libp2p-integration
Sep 9, 2019
Merged

Feature/libp2p integration#183
ericsson49 merged 9 commits intointeropfrom
feature/libp2p-integration

Conversation

@Nashatyrev
Copy link
Copy Markdown
Contributor

@Nashatyrev Nashatyrev commented Sep 7, 2019

Libp2p integration.

Prerequisites: Libp2p-jvm published to local maven repo:

Working scenario (NOTE: either specify different --db-prefix for nodes or start them in different working dirs to avoid db file conflict) :

  • Node --name=v-01 --db-prefix=db1 --listen=40001 --validators=0-7 default
  • Node --name=v-04 --db-prefix=db2 --validators=8-15 --connect=/ip4/127.0.0.1/tcp/40001:11111111111111111111111111111111111111111111111111111111111111111111 default

(Travis failed due to absence of libp2p-jvm artifact)

--db-prefix option added. see usage example above.

Nashatyrev and others added 6 commits September 6, 2019 17:51
# Conflicts:
#	start/common/src/main/java/org/ethereum/beacon/start/common/NodeLauncher.java
#	start/node/src/main/java/org/ethereum/beacon/node/NodeCommandLauncher.java
#	versions.gradle
#	wire/src/main/java/org/ethereum/beacon/wire/impl/plain/net/netty/NettyServer.java
#	wire/src/test/java/org/ethereum/beacon/wire/NodeTest.java
@mkalinin mkalinin mentioned this pull request Sep 8, 2019
11 tasks
Copy link
Copy Markdown
Member

@zilm13 zilm13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Titanic work is done by you. Gratz!!

Libp2pLauncher libp2pLauncher = new Libp2pLauncher();

if (networkCfg instanceof NettyNetwork) {
throw new UnsupportedOperationException("Netty network is not supported anymore");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add some kind of @Deprecated to NettyNetwork in this case?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will sort it out a bit later. May be it makes sense to get rid of NettyNetwork stuff completely, since old Netty and new Libp2p are pretty different in terms of interfaces

.getActivePeers()
.stream()
.map(
a -> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we'd move it in future to separate parsers including enr parser

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this is now kind of temp format. Will stick to common format (other clients will be using) later

Comment thread wire/src/main/java/org/ethereum/beacon/wire/impl/libp2p/Libp2pPeerManager.java Outdated
@ericsson49 ericsson49 merged commit f04fce3 into interop Sep 9, 2019
@mkalinin mkalinin mentioned this pull request Sep 23, 2019
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants